package com.xt.dao;

import com.xt.bean.Section;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * Created by XT on 2018/5/3.
 */
public interface SectionRepository extends MongoRepository<Section,String> {

//    private String name;//：章节名
//    private String fatherId;//父id
//    private Boolean hasChild;//是否有子节点  新增/删除/时要维护
//    private String courseId;//：课程id
//    private String courseName;//：课程名
//    private String teacherId;//：教师员id
//    private String teacherName;//：教师名称

    //根据课程id和教师id查找 课程知识点信息 父节点
    List<Section> findByCourseIdAndTeacherId(String courseId, String teacherId);

    //根据父节点id查找列表
    List<Section> findByFatherId(String fatherId);



}
